FROM ubuntu:22.04
RUN apt update && apt install -y git build-essential libssl-dev
WORKDIR /app
COPY ./cangjie/Cangjie-0.53.13-linux_x64.tar.gz .
RUN tar xzvf Cangjie-0.53.13-linux_x64.tar.gz
RUN rm -f Cangjie-0.53.13-linux_x64.tar.gz
COPY ./cangjie_gateway ./cangjie_gateway
WORKDIR /app/cangjie_gateway
RUN /bin/bash -c ". /app/cangjie/envsetup.sh;cjpm clean;cjpm update;cjpm build"
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/app/cangjie_gateway/entrypoint.sh"]